Skip to content

ci: add cargo test job on ubuntu + macos matrix#30

Merged
rocketman-code merged 1 commit intomainfrom
chore/ci/add-tests-matrix
Apr 14, 2026
Merged

ci: add cargo test job on ubuntu + macos matrix#30
rocketman-code merged 1 commit intomainfrom
chore/ci/add-tests-matrix

Conversation

@rocketman-code
Copy link
Copy Markdown
Owner

@rocketman-code rocketman-code commented Apr 14, 2026

Summary

  • Adds a tests job to CI that runs cargo test --release on a matrix of [ubuntu-latest, macos-latest].
  • Closes a real gap: the 23 unit tests had no CI gate. Local cargo test passes were the only signal; a regression could merge if the maintainer forgot to run tests before pushing.

Why this matrix shape

Tests have a dependency surface — the set of things whose change could change the test's output. Tests should run at the minimum specificity that contains their dependency surface. For our 23 tests (parser tests, format conversion, name validation, no fs ops, no syscalls): dependency surface is pure Rust + libc-or-stdlib. They attach at the ROOT of the platform graph.

ROOT is bounded by what production code compiles for. Our code uses Unix APIs (std::os::unix::fs::symlink, libc::localtime_r) — compiles on Linux + macOS, not Windows. So ROOT = Unix platforms, and the matrix is [ubuntu-latest, macos-latest].

Verified empirically that tests pass on macOS (Darwin 25.3.0, rustc 1.93.1, all 23 tests green) before adopting this design.

Why not also Fedora VM

The existing x86_64 lima Fedora VM job runs atomic-rollback check which DOES have Fedora-specific dependencies (specific paths, btrfs tooling, BLS layout). That's a deeper node in the dependency graph and stays where it is. Running unit tests inside the Fedora VM would be over-testing — pure-logic tests don't need a Fedora environment to verify their correctness.

Test plan

  • Tests verified passing locally on macOS (Darwin 25.3.0, rustc 1.93.1, 23/23)
  • Workflow YAML diff is the minimum addition to existing file (existing jobs unchanged)
  • CI tests (ubuntu-latest) job passes on this PR (16s)
  • CI tests (macos-latest) job passes on this PR (27s)
  • Existing x86_64 (2m15s) and aarch64-cross (35s) jobs still pass on this PR (no regression)

The 23 unit tests had no CI gate. Local cargo test passes were the
only signal; a regression could merge if the maintainer forgot to run
tests before pushing.

Runs cargo test --release on a matrix of [ubuntu-latest, macos-latest].
The tests are pure logic (parser, format conversion, name validation)
with dependency surface bounded only by what the production code
compiles for. Production code uses Unix APIs (std::os::unix,
libc::localtime_r) so it compiles on Linux + macOS but not Windows;
running on both members of that surface verifies the platform-
independence we implicitly assert.

The existing x86_64 lima Fedora VM job is unchanged. It tests
`atomic-rollback check` against a real Fedora 43 environment, which is
its own (deeper) dependency surface. The new tests job tests pure
logic at the root of the dependency graph.
@rocketman-code rocketman-code merged commit 871d4f7 into main Apr 14, 2026
4 checks passed
@rocketman-code rocketman-code deleted the chore/ci/add-tests-matrix branch April 14, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant